import React, { Component } from 'react'
import Signin from './Sign_in'
import Logon from './logon'

export default class Middleware extends Component {
    render() {
        const { onChangPage, date } = this.props
        console.log(date);
        if (date === 'Sign_in') {
            return (<Logon onChangPage={onChangPage} />)
        }
        if (date === 'Logon') {
            return (<Signin onChangPage={onChangPage} />)
        }
        return (<Signin onChangPage={onChangPage} />)
    }
}
